Skip to main content

All Questions

-2votes
1answer
180views

Vanilla interface implementations. What should I call it? [closed]

Some may think I'm kidding, but I'm really stuck on this Suppose you have some UserDao interface that you want to implement What should you call it? Here are a few points I'd like to make I firmly ...
Sergey Zolotarev's user avatar
1vote
3answers
220views

How robust should an interface/implementation be?

In a spare-time project of mine, I implemented RSA public-key cryptosystem. Because the official PKCS#1 standard specify key formats in terms of ASN.1 syntax and DER/BER coding, which is a coding with ...
DannyNiu's user avatar
3votes
1answer
345views

How are interfaces implemented behind the scenes in the Go language?

I have read this article which indicates a double tuple structure, but it is unfortunately light on implementation details, which is what I am looking for. So... how are interfaces implemented in Go? ...
SRNissen's user avatar
1vote
1answer
328views

Gradle/Maven project splitting: interfaces and implementation

Assume we have a single large JVM project (the example is in Kotlin), containing code. As part of a refactoring effort, we are decoupling pieces of the code by splitting the code into multiple modules,...
Hidde's user avatar
2votes
4answers
2kviews

Confused about inheritance and correct usage. Should I avoid using members in base class?

I am using C++ , but as far as I understand most OO principles are cross language. In most of the articles that I have read and liked about inheritance the advice are about : not to use it for the ...
user3717741's user avatar
3votes
3answers
1kviews

Java interface design: where should I put a lot of duplicate code that will be used by all subclasses?

Java interface design: where should I put a lot of duplicate code that will be used by all subclasses? interface Tuple { void method1(); } class Tuple1 implements Tuple { @Override public ...
Guo's user avatar
  • 177
-2votes
3answers
99views

Behaviour that depends on two sides

I would like to have the following interface: Resource { public: void copyInto(Resource* src) = 0; } But in order to implement this, the implementation would need to know (or make assumptions about) ...
LeonTheProfessional's user avatar
1vote
1answer
138views

Can a class represent two implementations?

I'm unsure about several things: I have a class that implements a NotificationDispatcher interface. This class I named WhatsappNotificationDispatcher, another implementation goes by ...
Hans's user avatar
  • 416
0votes
2answers
2kviews

Use case for interface

While going through some lecture video on interface. I noticed If we don't know about implementation, just requirement specification then go for interface. What can be the scenario? Though I've ...
Surya Bhusal's user avatar
17votes
6answers
9kviews

What does the author mean by casting the interface reference to any implementation?

I am currently in the process of trying to master C#, so I am reading Adaptive Code via C# by Gary McLean Hall. He writes about patterns and anti-patterns. In the implementations versus interfaces ...
Marshall's user avatar
0votes
2answers
369views

Is implementations not being interchangeable and having to cast often a code smell?

I'm building a small game similar to chess. I'd like to be able to reuse the structure for another version of checkers too. I'm modeling the games with interfaces (showing only relevant ones): ...
garci560's user avatar
-2votes
2answers
6kviews

Separate interface from implementation

What is the meaning of separating interface from implementation in C++? And also what is implied by interface and implementation?
Abhyuday Singh's user avatar
5votes
2answers
1kviews

Is it acceptable to make changes to an interface during implementation?

When writing a library/API for the first time I'll usually start by sketching some ideas on a white-board or loose-leaf while thinking about how different parts of the system interact. This usually ...
Snoop's user avatar
  • 2,748
2votes
1answer
155views

Lower class count vs explicitness

To help with an application that manipulates and works from an XML structure to produce other information, I've created a class structure that closely follows the XML structure. So, the XML is: <...
HorusKol's user avatar
6votes
1answer
1kviews

What is the origin of "Program to an interface, not an implementation"? [closed]

What is the origin of "Program to an interface, not an implementation"? Does it originate from Design Patterns, 1994, by GoF, or from a computer scientist or from some concepts in computer ...
nonopolarity's user avatar

153050per page
close